package megamente.modelo;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the sala database table.
 * 
 */
@Embeddable
public class SalaPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private int idSala;

	private int idSucursal;

    public SalaPK() {
    }
	public int getIdSala() {
		return this.idSala;
	}
	public void setIdSala(int idSala) {
		this.idSala = idSala;
	}
	public int getIdSucursal() {
		return this.idSucursal;
	}
	public void setIdSucursal(int idSucursal) {
		this.idSucursal = idSucursal;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof SalaPK)) {
			return false;
		}
		SalaPK castOther = (SalaPK)other;
		return 
			(this.idSala == castOther.idSala)
			&& (this.idSucursal == castOther.idSucursal);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idSala;
		hash = hash * prime + this.idSucursal;
		
		return hash;
    }
}